package leetcode.code0140;

import java.util.List;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution140 implements IDebug {

	public abstract List<String> wordBreak(String s, List<String> wordDict);

	@Override
	public void debug1() {
		List<String> e = HelpDebug.str2liststr("[\"cats and dog\",\"cat sand dog\"]");
		List<String> r = this.wordBreak("catsanddog", HelpDebug.str2liststr("[\"cat\", \"cats\", \"and\", \"sand\", \"dog\"]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		List<String> e = HelpDebug.str2liststr("[\"pine apple pen apple\",\"pineapple pen apple\",\"pine applepen apple\"]");
		List<String> r = this.wordBreak("pineapplepenapple",
				HelpDebug.str2liststr("[\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		List<String> e = HelpDebug.str2liststr("[]");
		List<String> r = this.wordBreak("catsandog", HelpDebug.str2liststr("[\"cats\", \"dog\", \"sand\", \"and\", \"cat\"]"));
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		List<String> e = HelpDebug.str2liststr("[\"cats and dog\",\"cat sand dog\"]");
		List<String> r = this.wordBreak("catsanddog", HelpDebug.str2liststr("[\"cat\", \"cats\", \"and\", \"sand\", \"dog\"]"));
		HelpDebug.compare(e, r);
	}

}
